<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
      xmlns:s="http://jboss.com/products/seam/taglib">


	<ui:define name="content">
		<h:form>

			<h:head>

				<title>Car manager</title>

			</h:head>
			<h:body>
				<h:panelGrid columns="2">
					<h:panelGroup>
						<s:graphicImage id="currentImage" value="#{CarPhoto.photo}"
							rendered="#{CarPhoto.photo != null}" styleClass="vpaPhoto" />
						<s:graphicImage id="defaultImage" value="/WEB-INF/img/default.png"
							rendered="#{CarPhoto.photo == null}" styleClass="vpaPhoto" />
					</h:panelGroup>
					<s:fileUpload id="imageUploader" data="#{CarPhoto.photo}"
						onchange="submit()" styleClass="imageUploader" />
				</h:panelGrid>
			</h:body>
		</h:form>
	</ui:define>
</html>
